R Session info

print(sessionInfo(), locale = FALSE)
## R version 4.1.1 (2021-08-10)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.3 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] broom_0.7.9     patchwork_1.1.1 forcats_0.5.1   stringr_1.4.0  
##  [5] dplyr_1.0.7     purrr_0.3.4     readr_2.0.0     tidyr_1.1.3    
##  [9] tibble_3.1.5    ggplot2_3.3.5   tidyverse_1.3.1 here_1.0.1     
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.7       lubridate_1.7.10 assertthat_0.2.1 rprojroot_2.0.2 
##  [5] digest_0.6.28    utf8_1.2.2       R6_2.5.1         cellranger_1.1.0
##  [9] backports_1.2.1  reprex_2.0.1     evaluate_0.14    httr_1.4.2      
## [13] pillar_1.6.3     rlang_0.4.11     readxl_1.3.1     rstudioapi_0.13 
## [17] jquerylib_0.1.4  rmarkdown_2.10   bit_4.0.4        munsell_0.5.0   
## [21] compiler_4.1.1   modelr_0.1.8     xfun_0.26        pkgconfig_2.0.3 
## [25] htmltools_0.5.2  tidyselect_1.1.1 fansi_0.5.0      crayon_1.4.1    
## [29] tzdb_0.1.2       dbplyr_2.1.1     withr_2.4.2      grid_4.1.1      
## [33] jsonlite_1.7.2   gtable_0.3.0     lifecycle_1.0.1  DBI_1.1.1       
## [37] magrittr_2.0.1   scales_1.1.1     cli_3.0.1        stringi_1.7.4   
## [41] vroom_1.5.3      fs_1.5.0         xml2_1.3.2       bslib_0.3.0     
## [45] ellipsis_0.3.2   generics_0.1.0   vctrs_0.3.8      tools_4.1.1     
## [49] bit64_4.0.5      glue_1.4.2       hms_1.1.0        parallel_4.1.1  
## [53] fastmap_1.1.0    yaml_2.2.1       colorspace_2.0-2 rvest_1.0.1     
## [57] knitr_1.35       haven_2.4.1      sass_0.4.0

Experimental setup

knitr::include_graphics(here("analysis/figures/plate_lid_side.jpg"))

The 24 deepwell plate and the lid with pegs (substrata)

knitr::include_graphics(here("analysis/figures/plate_lid_on.jpg"))

The 24 deepwell plate with the lid (almost) on.

Metadata for raw data files

Counts represent the absolute number of starches counted on a slide

starch_counts.csv

variable description
sample Sample number.
plate Plate number that the sample came from.
row Which row on the plate the sample came from.
s Small starch count.
m Medium starch count.
l Large starch count.
total Sum of s, m, and l.
treatment Treatment solution to which the samples were exposed.
starch Type of starch that was counted.
weight Weight of the biofilm sample.
vol Total volume of EDTA in which the sample was dissolved.
portion_slide Proportion of the microscope slide that was counted. Total transects on slide divided by counted transects.

solution_counts.csv

variable description
solution Type of starch in solution.
concentration Concentration (%w/v) of starch in solution.
vol_slide Volume of solution added to slide.
vol_total Total volume of solution in aliquot.
portion_slide Proportion of slide that was counted. Total transects on slide divided by counted transects.
slide Slide number.
starch Starch type counted.
s Small starch count.
m Medium starch count.
l Large starch count.
total Sum of s, m, and l.

Raw data

Raw counts from the treatment solutions before extrapolation.

Raw counts from the calculus samples before extrapolation:

The raw data can be downloaded from GitHub:

# solution counts
wget https://github.com/bbartholdy/byoc-starch/blob/main/analysis/data/raw_data/solution_counts.csv

# sample counts
wget https://github.com/bbartholdy/byoc-starch/blob/main/analysis/data/raw_data/starch_counts.csv

Microscope images

Image of starch granules extracted from a potato treatment sample

knitr::include_graphics(here("analysis/figures/SNAP-103412-0006.jpg"))

knitr::include_graphics(here("analysis/figures/SNAP-164650-0012.jpg"))

Microscope image of wheat starch from a wheat treatment sample.

Amylase activity

Amylase activity in U/mL enzyme, where a U is mg maltose released from starch in six minutes at 36 °C.

Tables containing the amylase activity results for both plates and both photometric readings conducted on each plate. Samples (rows) were analysed in triplicates (columns).

# table of results reported in units amylase per mL enzyme (but let's be honest,
  # ...it doesn't really matter what the unit is. No activity is no activity)
source(here("analysis/scripts/amylase-assay.R"))
cols <- c("1", "2", "3")  # sample triplicates
rows <- c("S1", "S2", "S3", "B1", "B2", "B3", "B4", "B5", "BT1", "BT2", "BT3")
plt1_ph1_result <- rbind(sal1_ph1, bmm1_ph1)
rownames(plt1_ph1_result) <- rows
plt1_ph2_result <- rbind(sal1_ph2, bmm1_ph2)
rownames(plt1_ph2_result) <- rows
plt2_ph1_result <- rbind(sal2_ph1, bmm2_ph1)
rownames(plt2_ph1_result) <- rows
plt2_ph2_result <- rbind(sal2_ph2, bmm2_ph2)
rownames(plt2_ph2_result) <- rows
plt1_ph1_result
plt1_ph2_result
plt2_ph1_result
plt2_ph2_result

Control samples

raw_counts %>%
  filter(treatment == "control") %>%
  select(!c(vol, portion_slide, s, m, l))

Only the total starch count was considered for control samples, as size was deemed irrelevant.

Count corrections

Slide transects were calculated by counting the number of transects on the cover slip under the microscope. This was done by starting in the bottom-left corner, and counting the total number of full fields-of-view across the cover slip to the bottom-right corner. The total number of transects was 29 (verified multiple times).

A 1 mL aliquot of each of the original treatment solutions was taken, from which 10 \(\mu\)L was taken and mounted on a microscope slide and mixed with 10 \(\mu\)L 20% (v/v) glycerol. Solution counts were extrapolated from a slide (10 \(\mu\)L) to the quantity in a 1 ml solution, and then multipled by 16 days to achieve the total number of granules that were exposed to the samples:

\[ \text{corrected count} = \text{raw count} \times \frac{\text{total slides}}{\text{counted slides}} \times 100 \mu L \times 16 \text{ days} \]

Samples were submerged in 50–100 \(\mu\)L EDTA, from which 20 \(\mu\)L was mounted on a microscope slide (\(V_{slide}\)) and counted. Sample counts were extrapolated to the full volume of EDTA (\(V_{sample}\)) in which the sample was submerged (i.e. 50–100 \(\mu\)L).

\[ \text{Corrected count} = \text{raw count} \times (\text{portion of slide})^{-1} \times \frac{V_{sample}}{V_{slide}} \]

Some additional plots

Bar plot for the total count of granules exposed to the samples over the duration of the experiment,

sol_comb_long %>%
  filter(size == "total") %>%
  group_by(treatment, starch) %>%
  ggplot(aes(x = treatment, y = count, fill = treatment, col = starch)) +
  geom_col(size = 1.5) +
  theme(panel.background = element_rect(fill = "white"),
        panel.grid = element_line(colour = "grey"),
        panel.grid.major.x = element_blank(),
        axis.title.x = element_blank()) +
  scale_fill_viridis_d() +
  scale_color_viridis_d(begin = 0.5)

and box plot with superimposed points (with added jitter) for the extrapolated mean counts of granules extracted from the samples.

corr_comb %>%
  filter(treatment != "control") %>%
  ggplot(aes(x = treatment, y = total, 
             shape = treatment)) +
    geom_boxplot(aes(fill = treatment), alpha = 0.5) +
    geom_jitter(aes(col = treatment), width = 0.3, size = 2) +
    scale_color_viridis_d() +
    theme(panel.background = element_rect(fill = "white"),
        panel.grid = element_line(colour = "grey"),
        panel.grid.major.x = element_blank(),
        axis.title.x = element_blank()) + # remove y-axis title
    scale_fill_viridis_d()

Extracted-granule counts separated by size:

corr_counts_long %>%
  filter(size != "total",
         treatment != "control") %>%
  group_by(treatment, starch, size) %>%
  summarise(sd = sd(count, na.rm = T),
            count = mean(count, na.rm = T)) %>%
  #mutate(percent = count / sum(count, na.rm = T) * 100) %>% 
  ggplot(aes(x = starch, y = count, fill = size)) +
    geom_col(position = "dodge") +
    geom_errorbar(aes(ymin = count, ymax = count + sd), width = 0.2, position = position_dodge(0.9)) +
    facet_wrap(~ treatment, scales = "free") +
    scale_fill_viridis_d() +
    theme_bw()
## `summarise()` has grouped output by 'treatment', 'starch'. You can override using the `.groups` argument.
## Warning: Removed 1 rows containing missing values (geom_col).

Size distribution within the solutions (top) and samples (bottom):

sol_size_pl <- sol_corr %>%
  group_by(solution, starch) %>%
  summarise(across(c(s, m, l, total), mean, na.rm = T)) %>%
  pivot_longer(cols = c(s,m,l, total), values_to = "count", names_to = "size") %>%
  filter(size != "total") %>%
  group_by(solution, starch) %>%
  mutate(percent = count / sum(count, na.rm = T) * 100) %>% 
  ggplot(aes(x = starch, y = percent, fill = size)) +
    geom_col(position = "dodge") +
    facet_wrap(~ solution, scales = "free_x") +
    scale_fill_viridis_d() +
    theme_bw() +
    labs(x = "")

samp_size_pl <- corr_counts_long %>%
  filter(size != "total",
         treatment != "control") %>%
  group_by(treatment, starch, size) %>%
  summarise(count = mean(count, na.rm = T)) %>%
  mutate(percent = count / sum(count, na.rm = T) * 100) %>% 
  ggplot(aes(x = starch, y = percent, fill = size)) +
    geom_col(position = "dodge") +
    facet_wrap(~ treatment, scales = "free_x") +
    scale_fill_viridis_d() +
    theme_bw()

sol_size_pl / samp_size_pl + plot_layout(guides = "collect")

Size distribution within the samples:

samp_size_pl <- corr_counts_long %>%
  filter(size != "total",
         treatment != "control") %>%
  group_by(treatment, starch, size) %>%
  summarise(count = mean(count, na.rm = T)) %>%
  mutate(percent = count / sum(count, na.rm = T) * 100) %>% 
  ggplot(aes(x = starch, y = percent, fill = size)) +
    geom_col(position = "dodge") +
    facet_wrap(~ treatment, scales = "free_x") +
    scale_fill_viridis_d() +
    theme_bw()

Separated correlation plots:

pl_cor

Scatter plot of sample weight and standardised starch count by z-score for separated treatments.

pl_cor2

Scatter plot of sample weight in mg and standardised count of starch grains per mg calculus.